package com.weitu.workflow.demo.service.impl;



import com.weitu.workflow.demo.entity.LeaveApplication;
import com.weitu.workflow.demo.mapper.LeaveApplicationMapper;
import com.weitu.workflow.demo.service.LeaveApplicationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * Created by Administrator on 2017/3/17.
 */
@Service
public class LeaveApplicationServiceImpl implements LeaveApplicationService {
    @Autowired
    private LeaveApplicationMapper leaveApplicationMapper;//流程管理mapper
    /***
     * 查询请假单列表数量
     * @return
     */
    public int queryLeaveApplicationCount(Map<String, Object> paramMap){
        return this.leaveApplicationMapper.queryLeaveApplicationCount(paramMap);
    }

    /***
     * 查询请假单集合
     * @return
     */
    public List<LeaveApplication> queryLeaveApplicationList(Map<String, Object> paramMap){
        return this.leaveApplicationMapper.queryLeaveApplicationList(paramMap);
    }
    /***
     * 添加请假单
     * @param paramMap
     * @return
     */
    public int addLeaveApplication(Map<String, Object> paramMap){
        return this.leaveApplicationMapper.addLeaveApplication(paramMap);
    }
    /***
     * 根据请假单id 查询请假单信息
     * @param id
     * @return
     */
    public LeaveApplication queryLeaveApplicationInfoById(String id){
        return this.leaveApplicationMapper.queryLeaveApplicationInfoById(id);
    }
}
